from pymongo import MongoClient

if __name__ == "__main__":
    client = MongoClient('mongodb://192.168.30.99:27018/cclp_db')
    db = client.cclp_db

    print(db.get_collection('cclp_ods').index_information())
    print(db.get_collection('cclp_ods_result').index_information())
    print(db.get_collection('cclp_ods_result.chunks').index_information())
    print(db.get_collection('cclp_ods_result.files').index_information())
    print(db.get_collection('cclp_dwd').index_information())
    print(db.get_collection('cclp_dwm_work').index_information())
    print(db.get_collection('cclp_dwm_modify').index_information())
    print(db.get_collection('cclp_dws_work').index_information())
    print(db.get_collection('cclp_dws_chapter').index_information())
    print(db.get_collection('cclp_dws_content').index_information())
    print(db.get_collection('cclp_dws_person').index_information())
    print(db.get_collection('cclp_dws_place').index_information())
    print(db.get_collection('cclp_dws_date').index_information())

    # db.get_collection('cclp_dws_modify').create_index([('label', 1), ('is_deprecated', 1), ('user_id', 1)],
    #                                                   name='label_index')
    # db.get_collection('cclp_dws_modify').create_index([('modify_id', 1), ('label', 1)],
    #                                                   name='modify_id_index')
    # db.get_collection('cclp_dws_modify').create_index([('update_date', 1), ('_id', 1)],
    #                                                   name='update_index')
    #
    # print(db.get_collection('cclp_dws_modify').index_information())
